import { observable, action } from 'mobx';
import { WeaTools } from 'ecCom';

export class OrderBySetStore {
    /**
     * 初始化数据
     */
    init = (params={})=> {
        WeaTools.callApi('/api/workflow/reqlist/getDefaultList', 'POST', params).then(data=>{
            this.updateInitData(data.iniddata);
            this.updateSelectedKeys(data.selectedKeys);
        })
    }

    @observable initdata=[];
    @action updateInitData = (data = []) => {
        this.initdata = data;
    }

    @observable selectedKeys =[];
    @action updateSelectedKeys =(sks = []) => {
        this.selectedKeys = sks;
    }

    @observable rightvalue = "";
    @action updateRightValue = (str = "") => {
        this.rightvalue = str;
    }

    @observable leftvalue = "";
    @action updateLeftValue = (str="") => {
        this.leftvalue = str;
    }
}